<!DOCTYPE html>
<html>
 <head>
  <title>login page</title>
	<link rel="stylesheet" href="../css/jquery.mobile-1.3.2.min.css" />
	<link rel="stylesheet" href="../css/searchAll.css" />
    <script type="text/javascript"  src="../js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="../js/jquery.mobile-1.3.2.min.js"></script>
	
	
  <script type="text/javascript">
	$(document).ready(function(){
		$('#searchAllDiv').hide();
		
		
		$('#serchAllById').change(function(){
			$('#searchAllDiv').show();
		});
		
			
		
		
		
	});
	function getTheList(){
			
			var str="";
			
		$.ajax({
					url:"abcd.txt",
					//data:{'methodetocall':'getname','name':'text'},
					}).done(function(res){
					alert('success'+res);
					for(var i = 0;i<res.split('#').length;i++){
				 str += "<li onClick='submitForm($(this));'><a href=javascript:addtosearchinputbname('"+res.split('#')[i]+"')>"+res.split('#')[i]+"</a></li>";
				 
		}
						$('#myList').append(str);
						$('#myList').listview("refresh");
					alert(str);
					
					}).fail(function(code){
					alert('error'+code);
					}); 
			
			
		
	}
	function submitForm(selectedObj){
		alert(selectedObj.text());
		var frm = document.getElementById('myForm');
		frm.submit();
	
	}
  </script>
 </head>
 <body>
  <div data-role="page" id="home">  
   <div data-position="fixed" data-role="header" data-theme="b">   
    <h1>  
     Search Page
    </h1>  
   </div>  
   <div align="center" data-role="content">
   <h1>PARVATI SOLVENTS EXTRACTION PVT LTD</h1>
			<h3>GUT NO.76, KHADGAON,TALUKA: BADNAPUR,DISTRICT:JALNA-431203,MAHARASHTRA,INDIA</h3>
   
    <div id="serachAllContainerDivId" style="width:50%;">
     <select name="serchBy" id="serchAllById" data-native-menu="false" tabindex="-1">
     <option value="">please select search criteria</option>
     <option value="brokerAll">Broker</option>
     <option value="customerAll">Customer</option>
     <option value="cityAll">City</option>
     <option value="districtAll">District</option>
    </select>
    </div>
    <br/>
    <div id="searchAllDiv">
    <div id="searchButtonDivId" style="width:35%;" >
     <button id="searchAllButtonId"  data-theme="a" onClick="getTheList();">Get the List</button>
    </div> 
	<br/>
	<ul id="myList" data-role="listview">
		<form id="myForm" action="dddd" method="POST">
			<input id="submitFormHiddenId" type="hidden"></input>
		</form>
	</ul>
     </div>
   
  </div>
  </div>
    </body>
</html>